Support for worm cartridges realized by linear tape file system (LTFS)

ABSTRACT

When a WORM cartridge is formatted for Tape File System (LTFS) in advance, such as prior to shipment, Linear Tape File System Library Edition (LTFS LE) is expanded by software to reduce consumption of the index partition and to support elimination of the appending of unnecessary data. More specifically, instead of recording metadata in the index partition during normal unmounting, the metadata is recorded in separate local storage such as on hard disk drive (HDD), and the index partition is updated only when the cartridge is ejected from the library. In this way, the present invention is able to significantly reduce the frequency of index partition updates. Because an update occurs only when the user intentionally ejects a cartridge, overflow of the index partition before overflow of the data partition can be prevented.

TECHNICAL FIELD

The present invention relates to a file system which realizes supportfor write once read many (WORM) cartridges.

BACKGROUND ART

A new file system called a Linear Tape File System (LTFS) has recentlybeen developed as a new use for tape.

LTFS is software (S/W) which works with hardware (H/W) resources toenable tape to be accessed via the file system interface.

LTFS is realized by storing data on tape cartridges using the LTFSformat, which has open specifications, and has been adopted by manycompanies other than IBM (IBM, the IBM logo, and ibm.com are trademarksor registered trademarks of International Business Machines Corporation,registered in many jurisdictions worldwide).

The LTFS format specifies that the tape built into the tape cartridge bedivided into two partitions: an index partition (IP) and a datapartition (DP).

Here, metadata such as allocation data for a file is recorded in theindex partition, and file data is primarily recorded in the datapartition.

The following is background information related to this recordingprocess.

File allocation information is frequently updated, but data is alwaysbeing appended so that the tape becomes a so-called sequential accessdevice. When data is recorded to a single partition, the allocationinformation is always recorded at the end.

Because the data at the end has to be read when a tape cartridge ismounted, the mounting process is time consuming.

In LTFS, metadata is overwritten in the beginning portion of the indexpartition when a tape cartridge is unmounted. As a result, it is alwayspossible to read the metadata from the index partition when a tape ismounted.

More precisely, metadata is also written to the data partition. Eventhough this takes time, the metadata recorded in the data partition canthen be used to restore a mounted tape cartridge when metadata cannot beupdated in the index partition due, for example, to a sudden powerinterruption.

A mechanism is also used to enable storage of a small amount of data inthe index partition. Data to be read during the mounting process canthen be retrieved rapidly from the index partition by recording the datanot only in the data partition but also in the index partition.

FIG. 1 is a diagram showing an example of information recorded on a tapecartridge.

In this example, a separately designated file (File B) and the mostrecent metadata (Metadata 3) are recorded in the index partition.

Metadata (Metadata 1, Metadata 2, Metadata 3) is also recorded in thedata partition along with the actual file data (File A, File B, File, C,File D).

Here, Metadata 1 and Metadata 2 in the data partition is old metadata.Because this information is basically appended to the tape, it is storedwithout performing any overwriting.

The timing for writing this metadata to the data partition can beestablished explicitly by an application (for example, by callingFlushFileBuffers( ) which is a standard API in Windows (a trademark ofMicrosoft Corporation, registered in many jurisdictions worldwide)), canbe established based on the timing for closing files in IBM LTFS, or canbe established to occur once a predetermined period of time has elapsed.

There are two basic versions of LTFS; LTFS SDE (Linear Tape File SystemSingle Drive Edition) in which a single tape cartridge is inserted intoa single tape drive, and LTFS LE (Linear Tape File System LibraryEdition) in which a plurality of tape cartridges are inserted into atape library.

In LTFS LE, each LTFS-formatted tape cartridge incorporated into a tapelibrary is expressed as a directory, and the data in each tape cartridgecan be accessed as files.

FIG. 2 is a diagram showing a view of directories in LTFS LE as anexample in which a tape library including inserted tape cartridgesAAA000, BBB000 and CCC000 have been mounted using LTFS LE.

In LTFS LE, the directories (dir1, dir2, dir3) created in tape cartridgeCCC000 can be viewed as subdirectories of directory CCC000.

When files are read and updated in a tape cartridge using LTFS LE, atape cartridge is mounted in a tape drive, and the data is accessed onthe tape cartridge.

The number of tape drives incorporated into a tape library is generallysmaller than the number of tape cartridges.

Therefore, when a tape cartridge is to be mounted in a tape drive, atape cartridge in use has to be unmounted if there are no free tapedrives, and the tape cartridge to be accessed is mounted.

FIG. 3 is a diagram showing the unmounting and mounting flow whenreading and writing occur.

In LTFS LE, the unmounting and mounting operations are concealed fromthe user, as shown in FIG. 3. If necessary (in accordance with theaccess request), the tape drives are assigned using an LRU-basedalgorithm, and tapes are unmounted and mounted in a manner not visibleto the user.

When LTFS LE is used, a tape library with a large storage capacity canbe used as ordinary disk storage. In this case, the LTFS LE may beshared via a network to create NAS.

Because information is recorded on tape cartridges using the LTFSformat, which is an open standard, LTFS LE can be easily used to removetape cartridges from a tape library and read them using differentsystems.

When data is moved to a remote site as an emergency precaution or toallow data to be shared at multiple locations, tape cartridges can beremoved from a tape library and physically moved without having toestablish an expensive broadband network.

Because it is less expensive to use NAS with HDDs, LTFS LE has attractedattention as a means of handling large quantities of data.

When LTFS LE is used as NAS and tape cartridges are removed and used ifnecessary, it is important to prevent data tampering in the case ofremoved data cartridges.

One method of preventing data tampering in LTO tape drives and TS1140tape drives is a mechanism referred to as “WORM (Write Once Read Many)”.

When WORM tape cartridges are used (referred to below as “WORMcartridges”), just as with CD-R, data once written cannot be updated ordeleted.

Therefore, there is demand for the use of WORM cartridges in LTFS LE asa way of preventing data tampering.

However, LTFS currently does not support WORM cartridges for thefollowing two reasons.

-   -   1. Fifth-generation and sixth-generation Linear Tape-Open (LTO)        tape drives and TS1140 tape drives supported by LTFS do not        support the creation of partitions in WORM cartridges.    -   2. Even if a tape drive were to support the creation of these        partitions, metadata cannot be overwritten in the index        partition of a WORM cartridge. It is appended.

Therefore, metadata is frequently appended to the index partition as asequence of operations is performed such as writing a small number offiles, unmounting a cartridge, and writing a small number of filesimmediately after mounting the cartridge.

Usually, less area is assigned to the index partition than to the datapartition in order to be able to store more data. However, when data isfrequently appended to the index partition, the capacity of the indexpartition may be exhausted even though more space is still available inthe data partition, and the tape may no longer be updated.

Because the cartridge mounting and unmounting operations are concealedfrom the user in LTFS LE, mounting and unmounting may occur frequently(simply by repeatedly accessing files in different directories) withoutthe user being aware that this is occurring.

As a result, the index partition may be updated many times without theuser being aware of this, and a large amount of the index partition maybe consumed.

Therefore, unnecessary appending of data has to be eliminated in orderto reduce consumption of capacity in the index partition.

It is not technically difficult to support (1) above, because a WORMcartridge could simply be partitioned in advance, for example, prior toshipment.

Shipment of LTFS-formatted cartridges is being considered for cartridgesintended for use in LTFS.

A WORM cartridge may be prepared or formatted by dividing the built-intape into two WORM partitions, for recording the history of a pluralityof files and metadata (including the allocation of one or more recordedfiles) in the one WORM data partition, and for recording metadata in theother WORM index partition.

A method has been developed for (2) above by applying WORM using only adata partition. This method is explained in detail in an applicationfiled by the present applicant (see Patent Literature 1).

However, a problem remains with applying WORM using only a datapartition as disclosed in Patent Literature 1 because there is no indexpartition for WORM, and tampering with index partition data cannot bedetected.

CITED LITERATURE

Patent Literature

Patent Literature 1PCT Publication WO2013/054597A1

-   -   a. (Applicant Reference No. JP920110094)

SUMMARY OF INVENTION

Technical Problems

It is an object of the present invention to solve the problem thatoccurs when a WORM cartridge is formatted for LTFS in advance, such asprior to shipment, the cartridge is used in LTFS LE, index partitionupdates occur frequently without the awareness of the user, and metadatacan no longer be written to the index partition even though the datapartition is free.

Means of Solving the Problem

In the present invention, when a WORM cartridge is formatted for LTFS inadvance such as prior to shipment, LTFS LE is expanded by software toreduce consumption of the index partition and to support elimination ofthe appending of unnecessary data.

More specifically, instead of recording metadata in the index partitionduring normal unmounting, the metadata is recorded in separate localstorage such as on an HDD, and the index partition is updated only whenthe cartridge is ejected from the library and is no longer managed bythe LTFS LE.

Effect of the Invention

In this way, the present invention is able to significantly reduce thefrequency of index partition updates.

Because an update occurs only when the user intentionally ejects a tapecartridge and the cartridge is no longer managed by the LTFS LE,overflow of the index partition before overflow of the data partitioncan be prevented.

BRIEF EXPLANATION OF THE DRAWINGS

FIG. 1 is a diagram showing an example of information recorded on a tapecartridge.

FIG. 2 is a diagram showing a view of directories in LTFS LE as anexample in which tape libraries including inserted tape cartridgesAAA000, BBB000 and CCC000 have been mounted using LTFS LE.

FIG. 3 is a diagram showing the unmounting and mounting flow whenreading and writing occur.

FIG. 4 is a diagram showing an example of a table T of the presentinvention.

FIG. 5 is a diagram showing the flow when access occurs in the presentinvention.

FIG. 6 is a diagram showing the flow when a tape cartridge is ejected inthe present invention.

EMBODIMENT OF THE INVENTION

The present invention assumes that a WORM cartridge formatted for LTFSin advance, such as prior to shipment, is being used.

The preparation of WORM cartridges formatted for LTFS in advance, suchas prior to shipment, is not currently in practice, but is nottechnically difficult to realize.

In the present invention, an area is prepared in local storage operatedby the LTFS LE, such as the HDD of a PC, for storing the metadata ofeach cartridge and file data to be written to an index partition.

This area is referred to as the “index area”.

An index area may be prepared only for each cartridge managed by theLTFS LE.

A table T indicating the access status of each cartridge by the LTFS LEis also prepared.

FIG. 4 is a diagram showing an example of a table T of the presentinvention.

There are three different access statuses as shown below, and 1, 2 or 3is recorded in the table T for reference purposes.

1: The cartridge has not been accessed.

2: The cartridge has been accessed, and the index area was not updatedafter index partition information was copied to the index area.

3: The cartridge has been accessed, and the index area was updated afterindex partition information was copied to the index area.

The table T may be stored in the memory used by the LTFS LE or may bestored in local non-volatile storage such as on an HDD which can bereused when the LTFS LE process has been ended and is restarted.

Three different statuses (1, 2, 3) can be used in the table T toindicate whether or not a cartridge has been accessed and whether or notthe index area has been updated. This is the specifying feature of thepresent invention.

When the user accesses a file and a cartridge inside a tape library isunmounted from the tape drive, a tape cartridge has to be accessed.

In a conventional LTFS LE, the index partition of a tape cartridge isaccessed when the tape cartridge is accessed.

In the present invention, the index area is accessed or not accesseddepending on the situation.

FIG. 5 is a diagram showing the flow when access occurs in the presentinvention.

More specifically, as shown in FIG. 5, the table T is referenced, theindex partition information is copied to the index area during initialaccess to the cartridge, and the index area is then accessed.

In Step 100, the process is initiated to respond to an access requestfor a file on a tape cartridge mounted in a tape drive.

In Step 110, the table T is referenced to acquire the access status ofthe tape cartridge.

In Step 120, it is determined whether or not the access status has beenset to 1.

If the access status has been set to 1, the tape cartridge is mounted ina tape drive, and metadata recorded in the WORM index partition is readfrom the mounted tape cartridge in Step 130.

In Step 140, the read metadata is written to the index area of localstorage.

In Step 150, the access status is set to 2 in the table T.

In Step 160, the metadata written to the index area is used to respondto the access request for the file (the metadata recorded in the WORMindex partition is not used).

In Step 170, it is determined whether or not an access request for themetadata written to the index area is accompanied by a metadata update.

If the access request is accompanied by a metadata update, and theaccess status in the table T is not 3, the access status is updated to 3in Step 180.

In Step 190, the response to the access request is completed.

By using a table T in this way to access a tape cartridge, the indexarea can be accessed after the cartridge has been mounted instead ofcontinuing to access the index partition as in a conventional LTFS LE.

FIG. 6 is a diagram showing the flow when a tape cartridge is ejected inthe present invention.

When a tape cartridge is ejected from the LTFS LE, as shown in FIG. 6,the information in the index area is written to the index partition ifnecessary before the tape cartridge is ejected.

In Step 200, the tape cartridge ejection process is initiated.

In Step 210, the table T is referenced to acquire the access status ofthe tape cartridge.

In Step 220, it is determined whether the access status has been set to3.

If the access status has been set to 3, the metadata written to theindex area is written to the WORM index partition in Step 230.

If this status has been set, the metadata written to the index area ofthe local storage is no longer needed and may be deleted.

This operation may be timed to coincide with the cartridge unmountingprocess when the cartridge is ejected.

In Step 240, the information related to the access status of the tapecartridge is deleted from the table T.

In Step 250, the tape cartridge ejection process may be performed in thesame manner as a conventional LTFS LE.

In Step 260, the tape cartridge ejection process is completed.

As explained in FIG. 5 and FIG. 6, the table is set to T (=1) when thetable T has not been set to either T (=2) or T (=3).

From FIG. 5 to FIG. 6, the updating, referencing and use of settings inthe table T follow the sequential order T (=1), T (=2), T (=3).

Viewed another way, three different statuses (1, 2, 3) are set in thetable T in the flow from FIG. 5 to FIG. 6, and whether or not a tapecartridge has been accessed can be identified by groupings 1, 2 and 3,and whether or not the index area of a tape cartridge has been updatedcan be identified by groupings 2 and 3.

Because the information in the index partition is updated only when acartridge is ejected from the LTFS LE, the frequency at which the indexpartition is updated can be significantly reduced.

A cartridge is ejected from the LTFS LE only when the user expresslyoperates the LTFS LE. Therefore, the index partition is updated onlywhen the user expressly does so.

As a result, the index partition can be prevented from overflowingbefore the data partition does so.

When a cartridge is inadvertently discharged from the tape librarywithout being expressly ejected, the most recent information may nothave been written to the index partition.

However, no data is lost because the latest index information has beenwritten to the data partition. The latest index information can then berecovered through the usual LTFS recovery process.

The present invention may be embodied by a person skilled in the artusing technical concepts in other categories. For example, a programcould be created to execute in a computer each step in the method of thepresent invention.

The invention claimed is:
 1. A file system for eliminating the appendingof unnecessary data created when a built-in tape in a tape cartridgemounted in a tape drive being used is accessed, to reduce consumption ofcapacity in a Write Once Read Many (WORM) index partition, the tapecartridge containing a built-in tape divided into two WORM partitions,the history of a plurality of files and metadata including theallocation of one or more recorded files being recorded in one WORM datapartition, and metadata being recorded in the WORM index partition,wherein the file system, in response to an access request for a file ona tape cartridge mounted in a tape drive, enables: metadata recorded inthe WORM index partition to be read; the read metadata to be written toan index area in local storage; metadata written to the index area to beused without using the metadata recorded in the WORM index partition inresponse to an access request to a file; determination of whether theaccess request for metadata written in the index area is accompanied byan update of the metadata; and writing the metadata written to the indexarea to the WORM index partition when it has been determined that theaccess request is accompanied by an update of the metadata.
 2. An LTFSLE (Linear Tape File System Library Edition) file system including thefile system according to claim 1, wherein the file system is a LTFS(Linear Tape File System), the tape cartridge mounted in the tape driveis a preformatted WORM cartridge, and the LTFS LE file system respondsto access requests for the tape cartridge inserted into a tape libraryvia an interface.